﻿<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection" />
		<meta content="emai=no" name="format-detection" />
		<link rel="stylesheet" type="text/css" href="<?php echo STATIC_HOST;?>shared/css/shared.css" />
		<link rel="stylesheet" type="text/css" href="/bind/css/common.css" />
		<link rel="stylesheet" type="text/css" href="/bind/css/samples.css" />
		<script type="text/javascript" src="<?php echo STATIC_HOST;?>shared/js/zepto-1.1.6.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script async="" charset="UTF-8" src="//static.meiqia.com/dist/meiqia.js?v=20"></script>
		<script type='text/javascript'>
			(function(m, ei, q, i, a, j, s) {
				m[a] = m[a] || function() {
						(m[a].a = m[a].a || []).push(arguments)
					};
				j = ei.createElement(q),
					s = ei.getElementsByTagName(q)[0];
				j.async = true;
				j.charset = 'UTF-8';
				j.src = i + '?v=' + new Date().getUTCDate();
				s.parentNode.insertBefore(j, s);
			})(window, document, 'script', '//static.meiqia.com/dist/meiqia.js', '_MEIQIA');
			_MEIQIA('entId', '20405');
			_MEIQIA('withoutBtn');
			_MEIQIA('init');
		</script>
		<script>
			Zepto(function ($) {
				function onBridgeReady() {
					<?php if($product_id == 2):?>
					WeixinJSBridge.call('showOptionMenu');
					<?php else:?>
					WeixinJSBridge.call('hideOptionMenu');
					<?php endif;?>
				}

				if (typeof WeixinJSBridge == "undefined") {
					if (document.addEventListener) {
						document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
					} else if (document.attachEvent) {
						document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
						document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
					}
				} else {
					onBridgeReady();
				}

				<?php if($product_id == 2):?>
				
				wx.config({
		            debug: false,
		            appId: '<?php echo $jsapi['js_config']['appId']?>',
		            timestamp: <?php echo $jsapi['js_config']['timestamp']?>,
		            nonceStr: '<?php echo $jsapi['js_config']['noncestr']?>',
		            signature: '<?php echo $jsapi['js_config']['signature']?>',
		            jsApiList: [
		                'onMenuShareTimeline',
		                'onMenuShareAppMessage'
		            ]
		        });


				 wx.ready(function () {
			            wx.onMenuShareTimeline({
			                title: '<?php echo $jsapi['share_title'];?>',
			                link: '<?php echo $jsapi['share_url']?>', // 分享链接
			                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
			                success: function () {
			                    // 用户确认分享后执行的回调函数
			                },
			                cancel: function () {
			                    // 用户取消分享后执行的回调函数
			                }
			            });

			            wx.onMenuShareAppMessage({
			                title: '<?php echo $jsapi['share_title']?>',
			                desc: '<?php echo $jsapi['share_content'];?>', // 分享描述
			                link: '<?php echo $jsapi['share_url']?>', // 分享链接
			                imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
			                type: 'link', // 分享类型,music、video或link，不填默认为link
			                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
			                success: function () {
			                    // 用户确认分享后执行的回调函数
			                },
			                cancel: function () {
			                    // 用户取消分享后执行的回调函数
			                }
			            });
			        });
			    <?php endif;?>
				
			});
		</script>
		<title>选择样本</title>
	</head>
	<body>
		<div class="wrapper">
			<!-- 没有检测样本时，显示no-result；反之，显示内容samples -->
			<!--<p class="no-result">目前还没有检测样本，赶紧去检测哦～</p>-->

			<?php if(empty($bindinfo)){ ?>
				<p class="no-result">目前还没有检测样本，赶紧去检测哦～</p>
			<?php }else{
				foreach($bindinfo as $k => $v){ ?>
					<ul class="samples">
						<li data-href="detail?id=<?php echo $v['bind_id'] ?>" class="flex-wrapper flex-align-center">
							<p>
								<img src="/bind/img/i_sample.png" alt="" />
							</p>
							<p>
								样本编号：<?php echo $v['bind_no']." ".$v['name']?>
							</p>
						</li>

					</ul>
			<?php } } ?>
			<!--	<section class="follow-notice">
					<hr />
					别着急，扫码添加芝士妈妈客服号（注明“减肥”），加入芝士妈妈减肥群，大家一起聊聊关于减肥那点事
					<img class="fullScreen" src="<?php echo STATIC_HOST;?>gene/img/qrcode_xiaoyi.jpg" />
				</section>
				<ul class="service-notice flex-wrapper flex-pack-justify">
					<li>
						<a href=" " onclick="_MEIQIA('showPanel')"><img src="<?php echo STATIC_HOST;?>gene/img/d_online.png"></a>
					</li>
					<li>
						<a href="tel:400-"><img src="<?php echo STATIC_HOST;?>gene/img/d_phone.png"></a>
					</li>
				</ul>
			-->

		</div>

		<footer>
			<ul>
				<li>
					<a href="/bind/sample/index?id=<?php echo $product_id?>" class="btn btn-green"><span class="icon icon-blood"></span>样本绑定</a>
				</li>
				<li>
					<a href="/product/detail?id=<?php echo $product_id?>" class="btn btn-blue"><span class="icon icon-book"></span>预 约</a>
				</li>
				<li>
					<a href="/sale/check/index?id=<?php echo $product_id?>" class="btn btn-red"><span class="icon icon-test"></span>我的检测</a>
				</li>
			</ul>
		</footer>
    <script type="text/javascript" src="<?php echo STATIC_HOST;?>shared/js/shared.js"></script>
	</body>
</html>